using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class insuredrelationMap : EntityTypeConfiguration<insuredrelation>
    {
        public insuredrelationMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.relation_type)
                .HasMaxLength(50);

            this.Property(t => t.insuredrelation_code)
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("insuredrelation");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.relation_type).HasColumnName("relation_type");
            this.Property(t => t.insuredrelation_code).HasColumnName("insuredrelation_code");
        }
    }
}
